<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>人员管理</title>
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/easyui/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/easyui/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/cms.css" />

	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/js/win.js"></script>
	<script type="text/javascript">
		function addUser(){
			openUrl("新增人员", 400, 300, "<%=request.getContextPath() %>/user/initEdit.do");
		}
		
		function reloadDg(){
			$("#dg").datagrid("reload");
			closeWin();
		}
		
		function deleteUser(){
			checkSelectSomeDoAction("#dg", "删除", "用户", "<%=request.getContextPath() %>/user/deleteUsers.do", true);
		}
		
		function editUser(){
			selectOneOpenUrl("#dg","<%=request.getContextPath() %>/user/initEdit.do", 400, 300, "修改", "人员");
		}
		
	</script>
</head>
<body>
	<div class="dg-content">
		<table id="dg" class="easyui-datagrid" title="人员列表"
			data-options="rownumbers:true,pagination:true,
				fitColumns:true,iconCls:'icon-users',toolbar:'#toolbar',url:'<%=request.getContextPath() %>/user/list.do'">
			<thead>
				<tr>
					<th data-options="field:'ck',checkbox:true"></th>
					<th data-options="field:'id',hidden:true"></th>
					<th data-options="field:'nickname',width:100,align:'center'">姓名</th>
					<th data-options="field:'username',width:80,align:'center'">用户名</th>
					<th data-options="field:'stateStr',width:80,align:'center'">状态</th>
				</tr>
			</thead>
		</table>
		<div class='dg-toolbar' id="toolbar" style="padding:5px 10px;">
			<a href="javascript:addUser()" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a>
			<a href="javascript:editUser()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
			<a href="javascript:deleteUser()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
		</div>
	</div>
	
</body>
</html>